3.249 \(\int \frac{\cot ^6(e+f x)}{(a+b \tan ^2(e+f x))^3} \, dx\)

Optimal. Leaf size=297 \[ \frac{b^{7/2} \left (99 a^2-154 a b+63 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a}}\right )}{8 a^{11/2} f (a-b)^3}-\frac{\left (8 a^2-91 a b+63 b^2\right ) \cot ^5(e+f x)}{40 a^3 f (a-b)^2}+\frac{\left (8 a^2 b+8 a^3-91 a b^2+63 b^3\right ) \cot ^3(e+f x)}{24 a^4 f (a-b)^2}-\frac{\left (8 a^2 b^2+8 a^3 b+8 a^4-91 a b^3+63 b^4\right ) \cot (e+f x)}{8 a^5 f (a-b)^2}-\frac{b (13 a-9 b) \cot ^5(e+f x)}{8 a^2 f (a-b)^2 \left (a+b \tan ^2(e+f x)\right )}-\frac{b \cot ^5(e+f x)}{4 a f (a-b) \left (a+b \tan ^2(e+f x)\right )^2}-\frac{x}{(a-b)^3} \]

[Out]

-(x/(a - b)^3) + (b^(7/2)*(99*a^2 - 154*a*b + 63*b^2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/(8*a^(11/2)*(a -
 b)^3*f) - ((8*a^4 + 8*a^3*b + 8*a^2*b^2 - 91*a*b^3 + 63*b^4)*Cot[e + f*x])/(8*a^5*(a - b)^2*f) + ((8*a^3 + 8*
a^2*b - 91*a*b^2 + 63*b^3)*Cot[e + f*x]^3)/(24*a^4*(a - b)^2*f) - ((8*a^2 - 91*a*b + 63*b^2)*Cot[e + f*x]^5)/(
40*a^3*(a - b)^2*f) - (b*Cot[e + f*x]^5)/(4*a*(a - b)*f*(a + b*Tan[e + f*x]^2)^2) - ((13*a - 9*b)*b*Cot[e + f*
x]^5)/(8*a^2*(a - b)^2*f*(a + b*Tan[e + f*x]^2))

________________________________________________________________________________________

Rubi [A]  time = 0.468399, antiderivative size = 297, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 7, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.304, Rules used = {3670, 472, 579, 583, 522, 203, 205} \[ \frac{b^{7/2} \left (99 a^2-154 a b+63 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a}}\right )}{8 a^{11/2} f (a-b)^3}-\frac{\left (8 a^2-91 a b+63 b^2\right ) \cot ^5(e+f x)}{40 a^3 f (a-b)^2}+\frac{\left (8 a^2 b+8 a^3-91 a b^2+63 b^3\right ) \cot ^3(e+f x)}{24 a^4 f (a-b)^2}-\frac{\left (8 a^2 b^2+8 a^3 b+8 a^4-91 a b^3+63 b^4\right ) \cot (e+f x)}{8 a^5 f (a-b)^2}-\frac{b (13 a-9 b) \cot ^5(e+f x)}{8 a^2 f (a-b)^2 \left (a+b \tan ^2(e+f x)\right )}-\frac{b \cot ^5(e+f x)}{4 a f (a-b) \left (a+b \tan ^2(e+f x)\right )^2}-\frac{x}{(a-b)^3} \]

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^6/(a + b*Tan[e + f*x]^2)^3,x]

[Out]

-(x/(a - b)^3) + (b^(7/2)*(99*a^2 - 154*a*b + 63*b^2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/(8*a^(11/2)*(a -
 b)^3*f) - ((8*a^4 + 8*a^3*b + 8*a^2*b^2 - 91*a*b^3 + 63*b^4)*Cot[e + f*x])/(8*a^5*(a - b)^2*f) + ((8*a^3 + 8*
a^2*b - 91*a*b^2 + 63*b^3)*Cot[e + f*x]^3)/(24*a^4*(a - b)^2*f) - ((8*a^2 - 91*a*b + 63*b^2)*Cot[e + f*x]^5)/(
40*a^3*(a - b)^2*f) - (b*Cot[e + f*x]^5)/(4*a*(a - b)*f*(a + b*Tan[e + f*x]^2)^2) - ((13*a - 9*b)*b*Cot[e + f*
x]^5)/(8*a^2*(a - b)^2*f*(a + b*Tan[e + f*x]^2))

Rule 3670

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(c*ff)/f, Subst[Int[(((d*ff*x)/c)^m*(a + b*(ff*x)^n)^p)/(c^
2 + ff^2*x^2), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rule 472

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> -Simp[(b*(e*x
)^(m + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*e*n*(b*c - a*d)*(p + 1)), x] + Dist[1/(a*n*(b*c - a*d)*(
p + 1)), Int[(e*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*b*(m + 1) + n*(b*c - a*d)*(p + 1) + d*b*(m + n*(
p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, m, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ[p
, -1] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 579

Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_)*((e_) + (f_.)*(x_)^(n_)), x
_Symbol] :> -Simp[((b*e - a*f)*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*g*n*(b*c - a*d)*(p +
1)), x] + Dist[1/(a*n*(b*c - a*d)*(p + 1)), Int[(g*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f)*(
m + 1) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*f)*(m + n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d,
 e, f, g, m, q}, x] && IGtQ[n, 0] && LtQ[p, -1]

Rule 583

Int[((g_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)),
x_Symbol] :> Simp[(e*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*c*g*(m + 1)), x] + Dist[1/(a*c*
g^n*(m + 1)), Int[(g*x)^(m + n)*(a + b*x^n)^p*(c + d*x^n)^q*Simp[a*f*c*(m + 1) - e*(b*c + a*d)*(m + n + 1) - e
*n*(b*c*p + a*d*q) - b*e*d*(m + n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p, q}, x] &&
 IGtQ[n, 0] && LtQ[m, -1]

Rule 522

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\cot ^6(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{x^6 \left (1+x^2\right ) \left (a+b x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{b \cot ^5(e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}+\frac{\operatorname{Subst}\left (\int \frac{4 a-9 b-9 b x^2}{x^6 \left (1+x^2\right ) \left (a+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{4 a (a-b) f}\\ &=-\frac{b \cot ^5(e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}-\frac{(13 a-9 b) b \cot ^5(e+f x)}{8 a^2 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )}+\frac{\operatorname{Subst}\left (\int \frac{8 a^2-91 a b+63 b^2-7 (13 a-9 b) b x^2}{x^6 \left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{8 a^2 (a-b)^2 f}\\ &=-\frac{\left (8 a^2-91 a b+63 b^2\right ) \cot ^5(e+f x)}{40 a^3 (a-b)^2 f}-\frac{b \cot ^5(e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}-\frac{(13 a-9 b) b \cot ^5(e+f x)}{8 a^2 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )}-\frac{\operatorname{Subst}\left (\int \frac{5 \left (8 a^3+8 a^2 b-91 a b^2+63 b^3\right )+5 b \left (8 a^2-91 a b+63 b^2\right ) x^2}{x^4 \left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{40 a^3 (a-b)^2 f}\\ &=\frac{\left (8 a^3+8 a^2 b-91 a b^2+63 b^3\right ) \cot ^3(e+f x)}{24 a^4 (a-b)^2 f}-\frac{\left (8 a^2-91 a b+63 b^2\right ) \cot ^5(e+f x)}{40 a^3 (a-b)^2 f}-\frac{b \cot ^5(e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}-\frac{(13 a-9 b) b \cot ^5(e+f x)}{8 a^2 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )}+\frac{\operatorname{Subst}\left (\int \frac{15 \left (8 a^4+8 a^3 b+8 a^2 b^2-91 a b^3+63 b^4\right )+15 b \left (8 a^3+8 a^2 b-91 a b^2+63 b^3\right ) x^2}{x^2 \left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{120 a^4 (a-b)^2 f}\\ &=-\frac{\left (8 a^4+8 a^3 b+8 a^2 b^2-91 a b^3+63 b^4\right ) \cot (e+f x)}{8 a^5 (a-b)^2 f}+\frac{\left (8 a^3+8 a^2 b-91 a b^2+63 b^3\right ) \cot ^3(e+f x)}{24 a^4 (a-b)^2 f}-\frac{\left (8 a^2-91 a b+63 b^2\right ) \cot ^5(e+f x)}{40 a^3 (a-b)^2 f}-\frac{b \cot ^5(e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}-\frac{(13 a-9 b) b \cot ^5(e+f x)}{8 a^2 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )}-\frac{\operatorname{Subst}\left (\int \frac{15 \left (8 a^5+8 a^4 b+8 a^3 b^2+8 a^2 b^3-91 a b^4+63 b^5\right )+15 b \left (8 a^4+8 a^3 b+8 a^2 b^2-91 a b^3+63 b^4\right ) x^2}{\left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{120 a^5 (a-b)^2 f}\\ &=-\frac{\left (8 a^4+8 a^3 b+8 a^2 b^2-91 a b^3+63 b^4\right ) \cot (e+f x)}{8 a^5 (a-b)^2 f}+\frac{\left (8 a^3+8 a^2 b-91 a b^2+63 b^3\right ) \cot ^3(e+f x)}{24 a^4 (a-b)^2 f}-\frac{\left (8 a^2-91 a b+63 b^2\right ) \cot ^5(e+f x)}{40 a^3 (a-b)^2 f}-\frac{b \cot ^5(e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}-\frac{(13 a-9 b) b \cot ^5(e+f x)}{8 a^2 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )}-\frac{\operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{(a-b)^3 f}+\frac{\left (b^4 \left (99 a^2-154 a b+63 b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a+b x^2} \, dx,x,\tan (e+f x)\right )}{8 a^5 (a-b)^3 f}\\ &=-\frac{x}{(a-b)^3}+\frac{b^{7/2} \left (99 a^2-154 a b+63 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a}}\right )}{8 a^{11/2} (a-b)^3 f}-\frac{\left (8 a^4+8 a^3 b+8 a^2 b^2-91 a b^3+63 b^4\right ) \cot (e+f x)}{8 a^5 (a-b)^2 f}+\frac{\left (8 a^3+8 a^2 b-91 a b^2+63 b^3\right ) \cot ^3(e+f x)}{24 a^4 (a-b)^2 f}-\frac{\left (8 a^2-91 a b+63 b^2\right ) \cot ^5(e+f x)}{40 a^3 (a-b)^2 f}-\frac{b \cot ^5(e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}-\frac{(13 a-9 b) b \cot ^5(e+f x)}{8 a^2 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )}\\ \end{align*}

Mathematica [B]  time = 6.30532, size = 949, normalized size = 3.2 \[ \frac{\left (-3184 \cos (e+f x) a^7-1536 \cos (3 (e+f x)) a^7-704 \cos (5 (e+f x)) a^7-536 \cos (7 (e+f x)) a^7-184 \cos (9 (e+f x)) a^7-720 (e+f x) \sin (e+f x) a^7-480 (e+f x) \sin (3 (e+f x)) a^7+480 (e+f x) \sin (5 (e+f x)) a^7+120 (e+f x) \sin (7 (e+f x)) a^7-120 (e+f x) \sin (9 (e+f x)) a^7+7440 b \cos (e+f x) a^6+7648 b \cos (3 (e+f x)) a^6+2656 b \cos (5 (e+f x)) a^6+248 b \cos (7 (e+f x)) a^6+440 b \cos (9 (e+f x)) a^6-3360 b (e+f x) \sin (e+f x) a^6+1920 b (e+f x) \sin (5 (e+f x)) a^6-1200 b (e+f x) \sin (7 (e+f x)) a^6+240 b (e+f x) \sin (9 (e+f x)) a^6-12000 b^2 \cos (e+f x) a^5-2912 b^2 \cos (3 (e+f x)) a^5-4128 b^2 \cos (5 (e+f x)) a^5+768 b^2 \cos (7 (e+f x)) a^5-160 b^2 \cos (9 (e+f x)) a^5-15120 b^2 (e+f x) \sin (e+f x) a^5+10080 b^2 (e+f x) \sin (3 (e+f x)) a^5-4320 b^2 (e+f x) \sin (5 (e+f x)) a^5+1080 b^2 (e+f x) \sin (7 (e+f x)) a^5-120 b^2 (e+f x) \sin (9 (e+f x)) a^5+10240 b^3 \cos (e+f x) a^4-1152 b^3 \cos (3 (e+f x)) a^4-3712 b^3 \cos (5 (e+f x)) a^4+128 b^3 \cos (7 (e+f x)) a^4+640 b^3 \cos (9 (e+f x)) a^4+6450 b^4 \cos (e+f x) a^3-14872 b^4 \cos (3 (e+f x)) a^3+5504 b^4 \cos (5 (e+f x)) a^3+6553 b^4 \cos (7 (e+f x)) a^3-3635 b^4 \cos (9 (e+f x)) a^3+714 b^5 \cos (e+f x) a^2-12796 b^5 \cos (3 (e+f x)) a^2+27684 b^5 \cos (5 (e+f x)) a^2-21441 b^5 \cos (7 (e+f x)) a^2+5839 b^5 \cos (9 (e+f x)) a^2-22890 b^6 \cos (e+f x) a+52080 b^6 \cos (3 (e+f x)) a-46200 b^6 \cos (5 (e+f x)) a+20895 b^6 \cos (7 (e+f x)) a-3885 b^6 \cos (9 (e+f x)) a+13230 b^7 \cos (e+f x)-26460 b^7 \cos (3 (e+f x))+18900 b^7 \cos (5 (e+f x))-6615 b^7 \cos (7 (e+f x))+945 b^7 \cos (9 (e+f x))\right ) \csc ^5(e+f x)}{7680 a^5 (a-b)^3 f (\cos (2 (e+f x)) a+a+b-b \cos (2 (e+f x)))^2}+\frac{b^{7/2} \left (99 a^2-154 b a+63 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a}}\right )}{8 a^{11/2} (a-b)^3 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[e + f*x]^6/(a + b*Tan[e + f*x]^2)^3,x]

[Out]

(b^(7/2)*(99*a^2 - 154*a*b + 63*b^2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/(8*a^(11/2)*(a - b)^3*f) + (Csc[e
 + f*x]^5*(-3184*a^7*Cos[e + f*x] + 7440*a^6*b*Cos[e + f*x] - 12000*a^5*b^2*Cos[e + f*x] + 10240*a^4*b^3*Cos[e
 + f*x] + 6450*a^3*b^4*Cos[e + f*x] + 714*a^2*b^5*Cos[e + f*x] - 22890*a*b^6*Cos[e + f*x] + 13230*b^7*Cos[e +
f*x] - 1536*a^7*Cos[3*(e + f*x)] + 7648*a^6*b*Cos[3*(e + f*x)] - 2912*a^5*b^2*Cos[3*(e + f*x)] - 1152*a^4*b^3*
Cos[3*(e + f*x)] - 14872*a^3*b^4*Cos[3*(e + f*x)] - 12796*a^2*b^5*Cos[3*(e + f*x)] + 52080*a*b^6*Cos[3*(e + f*
x)] - 26460*b^7*Cos[3*(e + f*x)] - 704*a^7*Cos[5*(e + f*x)] + 2656*a^6*b*Cos[5*(e + f*x)] - 4128*a^5*b^2*Cos[5
*(e + f*x)] - 3712*a^4*b^3*Cos[5*(e + f*x)] + 5504*a^3*b^4*Cos[5*(e + f*x)] + 27684*a^2*b^5*Cos[5*(e + f*x)] -
 46200*a*b^6*Cos[5*(e + f*x)] + 18900*b^7*Cos[5*(e + f*x)] - 536*a^7*Cos[7*(e + f*x)] + 248*a^6*b*Cos[7*(e + f
*x)] + 768*a^5*b^2*Cos[7*(e + f*x)] + 128*a^4*b^3*Cos[7*(e + f*x)] + 6553*a^3*b^4*Cos[7*(e + f*x)] - 21441*a^2
*b^5*Cos[7*(e + f*x)] + 20895*a*b^6*Cos[7*(e + f*x)] - 6615*b^7*Cos[7*(e + f*x)] - 184*a^7*Cos[9*(e + f*x)] +
440*a^6*b*Cos[9*(e + f*x)] - 160*a^5*b^2*Cos[9*(e + f*x)] + 640*a^4*b^3*Cos[9*(e + f*x)] - 3635*a^3*b^4*Cos[9*
(e + f*x)] + 5839*a^2*b^5*Cos[9*(e + f*x)] - 3885*a*b^6*Cos[9*(e + f*x)] + 945*b^7*Cos[9*(e + f*x)] - 720*a^7*
(e + f*x)*Sin[e + f*x] - 3360*a^6*b*(e + f*x)*Sin[e + f*x] - 15120*a^5*b^2*(e + f*x)*Sin[e + f*x] - 480*a^7*(e
 + f*x)*Sin[3*(e + f*x)] + 10080*a^5*b^2*(e + f*x)*Sin[3*(e + f*x)] + 480*a^7*(e + f*x)*Sin[5*(e + f*x)] + 192
0*a^6*b*(e + f*x)*Sin[5*(e + f*x)] - 4320*a^5*b^2*(e + f*x)*Sin[5*(e + f*x)] + 120*a^7*(e + f*x)*Sin[7*(e + f*
x)] - 1200*a^6*b*(e + f*x)*Sin[7*(e + f*x)] + 1080*a^5*b^2*(e + f*x)*Sin[7*(e + f*x)] - 120*a^7*(e + f*x)*Sin[
9*(e + f*x)] + 240*a^6*b*(e + f*x)*Sin[9*(e + f*x)] - 120*a^5*b^2*(e + f*x)*Sin[9*(e + f*x)]))/(7680*a^5*(a -
b)^3*f*(a + b + a*Cos[2*(e + f*x)] - b*Cos[2*(e + f*x)])^2)

________________________________________________________________________________________

Maple [A]  time = 0.107, size = 466, normalized size = 1.6 \begin{align*} -{\frac{1}{5\,f{a}^{3} \left ( \tan \left ( fx+e \right ) \right ) ^{5}}}+{\frac{1}{3\,f{a}^{3} \left ( \tan \left ( fx+e \right ) \right ) ^{3}}}+{\frac{b}{f{a}^{4} \left ( \tan \left ( fx+e \right ) \right ) ^{3}}}-{\frac{1}{f{a}^{3}\tan \left ( fx+e \right ) }}-3\,{\frac{b}{f{a}^{4}\tan \left ( fx+e \right ) }}-6\,{\frac{{b}^{2}}{f{a}^{5}\tan \left ( fx+e \right ) }}+{\frac{19\,{b}^{5} \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{8\,f{a}^{3} \left ( a-b \right ) ^{3} \left ( a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}-{\frac{17\,{b}^{6} \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{4\,f{a}^{4} \left ( a-b \right ) ^{3} \left ( a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{15\,{b}^{7} \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{8\,f{a}^{5} \left ( a-b \right ) ^{3} \left ( a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{21\,{b}^{4}\tan \left ( fx+e \right ) }{8\,f{a}^{2} \left ( a-b \right ) ^{3} \left ( a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}-{\frac{19\,{b}^{5}\tan \left ( fx+e \right ) }{4\,f{a}^{3} \left ( a-b \right ) ^{3} \left ( a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{17\,{b}^{6}\tan \left ( fx+e \right ) }{8\,f{a}^{4} \left ( a-b \right ) ^{3} \left ( a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{99\,{b}^{4}}{8\,f{a}^{3} \left ( a-b \right ) ^{3}}\arctan \left ({b\tan \left ( fx+e \right ){\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}-{\frac{77\,{b}^{5}}{4\,f{a}^{4} \left ( a-b \right ) ^{3}}\arctan \left ({b\tan \left ( fx+e \right ){\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{\frac{63\,{b}^{6}}{8\,f{a}^{5} \left ( a-b \right ) ^{3}}\arctan \left ({b\tan \left ( fx+e \right ){\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}-{\frac{\arctan \left ( \tan \left ( fx+e \right ) \right ) }{f \left ( a-b \right ) ^{3}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^6/(a+b*tan(f*x+e)^2)^3,x)

[Out]

-1/5/f/a^3/tan(f*x+e)^5+1/3/f/a^3/tan(f*x+e)^3+1/f/a^4/tan(f*x+e)^3*b-1/f/a^3/tan(f*x+e)-3/f/a^4/tan(f*x+e)*b-
6/f/a^5/tan(f*x+e)*b^2+19/8/f*b^5/a^3/(a-b)^3/(a+b*tan(f*x+e)^2)^2*tan(f*x+e)^3-17/4/f*b^6/a^4/(a-b)^3/(a+b*ta
n(f*x+e)^2)^2*tan(f*x+e)^3+15/8/f*b^7/a^5/(a-b)^3/(a+b*tan(f*x+e)^2)^2*tan(f*x+e)^3+21/8/f*b^4/a^2/(a-b)^3/(a+
b*tan(f*x+e)^2)^2*tan(f*x+e)-19/4/f*b^5/a^3/(a-b)^3/(a+b*tan(f*x+e)^2)^2*tan(f*x+e)+17/8/f*b^6/a^4/(a-b)^3/(a+
b*tan(f*x+e)^2)^2*tan(f*x+e)+99/8/f*b^4/a^3/(a-b)^3/(a*b)^(1/2)*arctan(b*tan(f*x+e)/(a*b)^(1/2))-77/4/f*b^5/a^
4/(a-b)^3/(a*b)^(1/2)*arctan(b*tan(f*x+e)/(a*b)^(1/2))+63/8/f*b^6/a^5/(a-b)^3/(a*b)^(1/2)*arctan(b*tan(f*x+e)/
(a*b)^(1/2))-1/f/(a-b)^3*arctan(tan(f*x+e))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^6/(a+b*tan(f*x+e)^2)^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.45771, size = 2547, normalized size = 8.58 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^6/(a+b*tan(f*x+e)^2)^3,x, algorithm="fricas")

[Out]

[-1/480*(480*a^5*b^2*f*x*tan(f*x + e)^9 + 960*a^6*b*f*x*tan(f*x + e)^7 + 480*a^7*f*x*tan(f*x + e)^5 + 60*(8*a^
5*b^2 - 99*a^2*b^5 + 154*a*b^6 - 63*b^7)*tan(f*x + e)^8 + 96*a^7 - 288*a^6*b + 288*a^5*b^2 - 96*a^4*b^3 + 20*(
48*a^6*b - 8*a^5*b^2 - 495*a^3*b^4 + 770*a^2*b^5 - 315*a*b^6)*tan(f*x + e)^6 + 32*(15*a^7 - 10*a^6*b + 3*a^5*b
^2 - 99*a^4*b^3 + 154*a^3*b^4 - 63*a^2*b^5)*tan(f*x + e)^4 - 32*(5*a^7 - 6*a^6*b - 12*a^5*b^2 + 22*a^4*b^3 - 9
*a^3*b^4)*tan(f*x + e)^2 + 15*((99*a^2*b^5 - 154*a*b^6 + 63*b^7)*tan(f*x + e)^9 + 2*(99*a^3*b^4 - 154*a^2*b^5
+ 63*a*b^6)*tan(f*x + e)^7 + (99*a^4*b^3 - 154*a^3*b^4 + 63*a^2*b^5)*tan(f*x + e)^5)*sqrt(-b/a)*log((b^2*tan(f
*x + e)^4 - 6*a*b*tan(f*x + e)^2 + a^2 - 4*(a*b*tan(f*x + e)^3 - a^2*tan(f*x + e))*sqrt(-b/a))/(b^2*tan(f*x +
e)^4 + 2*a*b*tan(f*x + e)^2 + a^2)))/((a^8*b^2 - 3*a^7*b^3 + 3*a^6*b^4 - a^5*b^5)*f*tan(f*x + e)^9 + 2*(a^9*b
- 3*a^8*b^2 + 3*a^7*b^3 - a^6*b^4)*f*tan(f*x + e)^7 + (a^10 - 3*a^9*b + 3*a^8*b^2 - a^7*b^3)*f*tan(f*x + e)^5)
, -1/240*(240*a^5*b^2*f*x*tan(f*x + e)^9 + 480*a^6*b*f*x*tan(f*x + e)^7 + 240*a^7*f*x*tan(f*x + e)^5 + 30*(8*a
^5*b^2 - 99*a^2*b^5 + 154*a*b^6 - 63*b^7)*tan(f*x + e)^8 + 48*a^7 - 144*a^6*b + 144*a^5*b^2 - 48*a^4*b^3 + 10*
(48*a^6*b - 8*a^5*b^2 - 495*a^3*b^4 + 770*a^2*b^5 - 315*a*b^6)*tan(f*x + e)^6 + 16*(15*a^7 - 10*a^6*b + 3*a^5*
b^2 - 99*a^4*b^3 + 154*a^3*b^4 - 63*a^2*b^5)*tan(f*x + e)^4 - 16*(5*a^7 - 6*a^6*b - 12*a^5*b^2 + 22*a^4*b^3 -
9*a^3*b^4)*tan(f*x + e)^2 - 15*((99*a^2*b^5 - 154*a*b^6 + 63*b^7)*tan(f*x + e)^9 + 2*(99*a^3*b^4 - 154*a^2*b^5
 + 63*a*b^6)*tan(f*x + e)^7 + (99*a^4*b^3 - 154*a^3*b^4 + 63*a^2*b^5)*tan(f*x + e)^5)*sqrt(b/a)*arctan(1/2*(b*
tan(f*x + e)^2 - a)*sqrt(b/a)/(b*tan(f*x + e))))/((a^8*b^2 - 3*a^7*b^3 + 3*a^6*b^4 - a^5*b^5)*f*tan(f*x + e)^9
 + 2*(a^9*b - 3*a^8*b^2 + 3*a^7*b^3 - a^6*b^4)*f*tan(f*x + e)^7 + (a^10 - 3*a^9*b + 3*a^8*b^2 - a^7*b^3)*f*tan
(f*x + e)^5)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**6/(a+b*tan(f*x+e)**2)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.63939, size = 414, normalized size = 1.39 \begin{align*} \frac{\frac{15 \,{\left (99 \, a^{2} b^{4} - 154 \, a b^{5} + 63 \, b^{6}\right )}{\left (\pi \left \lfloor \frac{f x + e}{\pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (b\right ) + \arctan \left (\frac{b \tan \left (f x + e\right )}{\sqrt{a b}}\right )\right )}}{{\left (a^{8} - 3 \, a^{7} b + 3 \, a^{6} b^{2} - a^{5} b^{3}\right )} \sqrt{a b}} - \frac{120 \,{\left (f x + e\right )}}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} + \frac{15 \,{\left (19 \, a b^{5} \tan \left (f x + e\right )^{3} - 15 \, b^{6} \tan \left (f x + e\right )^{3} + 21 \, a^{2} b^{4} \tan \left (f x + e\right ) - 17 \, a b^{5} \tan \left (f x + e\right )\right )}}{{\left (a^{7} - 2 \, a^{6} b + a^{5} b^{2}\right )}{\left (b \tan \left (f x + e\right )^{2} + a\right )}^{2}} - \frac{8 \,{\left (15 \, a^{2} \tan \left (f x + e\right )^{4} + 45 \, a b \tan \left (f x + e\right )^{4} + 90 \, b^{2} \tan \left (f x + e\right )^{4} - 5 \, a^{2} \tan \left (f x + e\right )^{2} - 15 \, a b \tan \left (f x + e\right )^{2} + 3 \, a^{2}\right )}}{a^{5} \tan \left (f x + e\right )^{5}}}{120 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^6/(a+b*tan(f*x+e)^2)^3,x, algorithm="giac")

[Out]

1/120*(15*(99*a^2*b^4 - 154*a*b^5 + 63*b^6)*(pi*floor((f*x + e)/pi + 1/2)*sgn(b) + arctan(b*tan(f*x + e)/sqrt(
a*b)))/((a^8 - 3*a^7*b + 3*a^6*b^2 - a^5*b^3)*sqrt(a*b)) - 120*(f*x + e)/(a^3 - 3*a^2*b + 3*a*b^2 - b^3) + 15*
(19*a*b^5*tan(f*x + e)^3 - 15*b^6*tan(f*x + e)^3 + 21*a^2*b^4*tan(f*x + e) - 17*a*b^5*tan(f*x + e))/((a^7 - 2*
a^6*b + a^5*b^2)*(b*tan(f*x + e)^2 + a)^2) - 8*(15*a^2*tan(f*x + e)^4 + 45*a*b*tan(f*x + e)^4 + 90*b^2*tan(f*x
 + e)^4 - 5*a^2*tan(f*x + e)^2 - 15*a*b*tan(f*x + e)^2 + 3*a^2)/(a^5*tan(f*x + e)^5))/f